var toTop = document.querySelector("#toTop");

window.onscroll = function(){
    console.log(document.documentElement.scrollTop || document.body.scrollTop);
    if(document.documentElement.scrollTop > 100 || document.body.scrollTop > 100){
        toTop.style.display = 'block';
    }else{
        toTop.style.display = 'none';
    }

};



toTop.addEventListener('click',function(){
    window.scrollTo(0,0);
    //window.scrollTo({
    //    top:0,
    //    behavior:'smooth'
    //
    //})
});


var dt_bav_btn = document.querySelector(".dt_nav_btn");
var dt_bav_content = document.querySelector(".dt_nav_content");


dt_bav_btn.addEventListener("mouseover",function(){
    dt_bav_content.style.display = "block";
});

dt_bav_btn.addEventListener("mouseleave",function(){
    dt_bav_content.style.display = "none";
});

dt_bav_content.addEventListener("mouseover",function(){
    dt_bav_content.style.display = "block";
});

dt_bav_content.addEventListener("mouseleave",function(){
    dt_bav_content.style.display = "none";
});




var mySwiper = new Swiper ('.swiper-container', {
    loop: true, // 循环模式选项

    // 如果需要分页器
    pagination: {
        el: '.swiper-pagination',
        clickable :true,
    },

    // 如果需要前进后退按钮
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
    },


});







function zan1() {
    var num = document.querySelector(".zan1").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan1").innerHTML = num+1;
}
function xin1() {
    var num = document.querySelector(".xin1").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin1").innerHTML = num+1;
}


function zan2() {
    var num = document.querySelector(".zan2").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan2").innerHTML = num+1;
}
function xin2() {
    var num = document.querySelector(".xin2").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin2").innerHTML = num+1;
}

function zan3() {
    var num = document.querySelector(".zan3").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan3").innerHTML = num+1;
}
function xin3() {
    var num = document.querySelector(".xin3").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin3").innerHTML = num+1;
}


function zan4() {
    var num = document.querySelector(".zan4").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan4").innerHTML = num+1;
}
function xin4() {
    var num = document.querySelector(".xin4").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin4").innerHTML = num+1;
}


function zan5() {
    var num = document.querySelector(".zan5").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan5").innerHTML = num+1;
}
function xin5() {
    var num = document.querySelector(".xin5").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin5").innerHTML = num+1;
}


function zan6() {
    var num = document.querySelector(".zan6").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan6").innerHTML = num+1;
}
function xin6() {
    var num = document.querySelector(".xin6").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin6").innerHTML = num+1;
}


function zan7() {
    var num = document.querySelector(".zan7").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan7").innerHTML = num+1;
}
function xin7() {
    var num = document.querySelector(".xin7").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin7").innerHTML = num+1;
}


function zan8() {
    var num = document.querySelector(".zan8").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan8").innerHTML = num+1;
}
function xin8() {
    var num = document.querySelector(".xin8").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin8").innerHTML = num+1;
}

function zan9() {
    var num = document.querySelector(".zan9").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan9").innerHTML = num+1;
}
function xin9() {
    var num = document.querySelector(".xin9").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin9").innerHTML = num+1;
}


function zan10() {
    var num = document.querySelector(".zan10").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan10").innerHTML = num+1;
}
function xin10() {
    var num = document.querySelector(".xin10").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin10").innerHTML = num+1;
}


function zan11() {
    var num = document.querySelector(".zan11").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan11").innerHTML = num+1;
}
function xin11() {
    var num = document.querySelector(".xin11").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin11").innerHTML = num+1;
}


function zan12() {
    var num = document.querySelector(".zan12").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan12").innerHTML = num+1;
}
function xin12() {
    var num = document.querySelector(".xin12").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin12").innerHTML = num+1;
}


function zan13() {
    var num = document.querySelector(".zan13").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan13").innerHTML = num+1;
}
function xin13() {
    var num = document.querySelector(".xin13").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin13").innerHTML = num+1;
}

function zan14() {
    var num = document.querySelector(".zan14").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan14").innerHTML = num+1;
}
function xin14() {
    var num = document.querySelector(".xin14").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin14").innerHTML = num+1;
}


function zan15() {
    var num = document.querySelector(".zan15").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan15").innerHTML = num+1;
}
function xin15() {
    var num = document.querySelector(".xin15").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin15").innerHTML = num+1;
}


function zan16() {
    var num = document.querySelector(".zan16").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan16").innerHTML = num+1;
}
function xin16() {
    var num = document.querySelector(".xin16").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin16").innerHTML = num+1;
}


function zan17() {
    var num = document.querySelector(".zan17").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".zan17").innerHTML = num+1;
}
function xin17() {
    var num = document.querySelector(".xin17").innerHTML;
    num = Number(num);
    console.log(num);
    document.querySelector(".xin17").innerHTML = num+1;
}
